package com.whnk.pm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.whnk.pm.mapper.IncomeDetailMapper;
import com.whnk.pm.domain.IncomeDetail;
import com.whnk.pm.service.IIncomeDetailService;
import com.whnk.common.support.Convert;

/**
 * 确认单明细 服务层实现
 * 
 * @author whwhnk
 * @date 2019-07-24
 */
@Service
public class IncomeDetailServiceImpl implements IIncomeDetailService 
{
	@Autowired
	private IncomeDetailMapper incomeDetailMapper;

	/**
     * 查询确认单明细信息
     * 
     * @param incdId 确认单明细ID
     * @return 确认单明细信息
     */
    @Override
	public IncomeDetail selectIncomeDetailById(Integer incdId)
	{
	    return incomeDetailMapper.selectIncomeDetailById(incdId);
	}
	
	/**
     * 查询确认单明细列表
     * 
     * @param incomeDetail 确认单明细信息
     * @return 确认单明细集合
     */
	@Override
	public List<IncomeDetail> selectIncomeDetailList(IncomeDetail incomeDetail)
	{
	    return incomeDetailMapper.selectIncomeDetailList(incomeDetail);
	}
	
    /**
     * 新增确认单明细
     * 
     * @param incomeDetail 确认单明细信息
     * @return 结果
     */
	@Override
	public int insertIncomeDetail(IncomeDetail incomeDetail)
	{
	    return incomeDetailMapper.insertIncomeDetail(incomeDetail);
	}
	
	/**
     * 修改确认单明细
     * 
     * @param incomeDetail 确认单明细信息
     * @return 结果
     */
	@Override
	public int updateIncomeDetail(IncomeDetail incomeDetail)
	{
	    return incomeDetailMapper.updateIncomeDetail(incomeDetail);
	}

	/**
     * 删除确认单明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteIncomeDetailByIds(String ids)
	{
		return incomeDetailMapper.deleteIncomeDetailByIds(Convert.toStrArray(ids));
	}
	
}
